a843791c8033d9b45b3d6aa3b735eef610138b2b,CodeSamples/com.opcoach.training.e4.codesamples/src/com/opcoach/training/e4/codesamples/ContextFromE3Sample.java,ContextFromE3Sample,getContextFromE3Code,#,15

Before Change




		// Get the application context
		IEclipseContext appliCtx = PlatformUI.getWorkbench().getService(IEclipseContext.class);
		appliCtx.set("myKeyInAppli", "value");
		
		// Can also get the OSGI context using parent access 

After Change


		//.........................................
		// Get the application E4 context
		//.........................................
		IWorkbench workbench = PlatformUI.getWorkbench();
		IEclipseContext appliCtx = workbench.getService(IEclipseContext.class);
		appliCtx.set("myKeyInAppli", "value");
		
		//.........................................
		// Get the main window E4 context
		//.........................................
		IEclipseContext windowCtx = workbench.getActiveWorkbenchWindow().getService(IEclipseContext.class);
		windowCtx.set("myKeyInWindow", "value");

	}